package com.cyz.web.app.callback;

import java.util.Optional;

public abstract class Task {

    public void executeWith(CallBack callBack){
        execute();
        Optional.ofNullable(callBack).ifPresent(CallBack::call);
    }


    public abstract void execute();

}
